/// 识别特征点的一些基础方法
///
#include "opencv2/highgui.hpp"
#include "opencv2/imgproc.hpp"
#include <iostream>

using namespace cv;
using namespace std;

int main(int argc, char *argv[])
{
    uchar uarr[8][8] = { { 1, 2, 3, 4, 5, 6, 7, 8, },
                         { 1, 2, 3, 4, 5, 6, 7, 8,  },
                         { 1, 2, 3, 4, 5, 6, 7, 8,  },
                         { 11, 12, 13, 14, 15, 16, 17, 18,  },
                         { 1, 2, 3, 4, 5, 6, 7, 8,  },
                         { 1, 2, 3, 4, 5, 6, 7, 8,  },
                         { 1, 2, 3, 4, 5, 6, 7, 8,  },
                         };

    Mat src_gray(8, 8, CV_8UC1, uarr);
    Mat myHarris_dst;

    /// Set some parameters
    int blockSize = 2, apertureSize = 3;

    /// My Harris matrix -- Using cornerEigenValsAndVecs
    /// 本例是 两个特征值 $(\lambda_1, \lambda_2, x_1, y_1, x_2, y_2)$
    cornerEigenValsAndVecs( src_gray, myHarris_dst, blockSize, apertureSize );

    cout << "src_gray:\n" << src_gray << endl;
    cout << "myHarris_dst:\n" << myHarris_dst << endl;

    return 0;
}
